import http from "@/utils/http";
// 列表
export function ListAPI() {
  return http({
    url: '/posts',
    method: 'get',
  })
}
// 发布
export function IssueAPI(title, content, status) {
  return http({
    url: '/posts',
    method: 'post',
    data: {
      title,
      content,
      status,
    }
  })
}
// 删除
export function DeleteAPI(id) {
  return http({
    url: '/posts/' + id,
    method: 'delete',
  })
}
// 修改
export function DateAPI(id, objss) {
  return http({
    url: '/posts/' + id,
    method: 'patch',
    data: objss
  })
}

export default {
  ListAPI,
  IssueAPI,
  DeleteAPI,
  DateAPI
}